package jf.jextn.converter;

import jf.jextn.JExtn;

public class CharacterConverter implements StringValueConverter<Character> {
    public final static CharacterConverter INSTANCE = new CharacterConverter();

    @Override
    public Character from(String value) {
        Character t = null;

        if (JExtn.hasValue(value)) {
            t = Character.valueOf(value.charAt(0));
        }

        return t;
    }

    @Override
    public String to(Character o) {
        return String.valueOf(o);
    }

}
